package test7;

import java.util.Arrays;
import java.util.Scanner;

public class Demo15 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextLine()) {
            String s = sc.nextLine();
            int[] arr = Arrays.stream(s.split(" ")).mapToInt(value -> Integer.parseInt(value)).toArray();
            StringBuilder str = new StringBuilder();
            for (int i = 0; i < arr.length; i++) {
                int out = arr[i];
                //A
                if (arr[i] < 91 && arr[i] > 87) {
                    out = 91;
                }
                //B
                else if (arr[i] < 84 && arr[i] > 80) {
                    out = 84;
                }
                //C
                else if (arr[i] < 77 && arr[i] > 73) {
                    out = 77;
                }
                //D
                else if (arr[i] < 70 && arr[i] > 66) {
                    out = 70;
                }
                //E
                else if (arr[i] < 63 && arr[i] > 59) {
                    out = 63;
                }
                str.append(out).append(" ");
            }
            System.out.println(str.substring(0, str.length() - 1));
        }
    }
}
